From df0e7ced6be7d8cb774b43745f50ae6f55a37f03 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 13 Apr 2004 16:34:30 +0000 Subject: [PATCH] Don't clobber xsi schema when merging. --- gpsbabel/gpx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index 95ea894bc..3f141638f 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -802,7 +802,9 @@ gpx_rd_init(const char *fname) * this across reads and we unlock the safety belt from the * leak tester. */ - xsi_schema_loc = strdup(DEFAULT_XSI_SCHEMA_LOC); + if (!xsi_schema_loc) { + xsi_schema_loc = strdup(DEFAULT_XSI_SCHEMA_LOC); + } if (!xsi_schema_loc) { fatal("gpx: Unable to allocate %d bytes of memory.\n", strlen(DEFAULT_XSI_SCHEMA_LOC) + 1); } -- 2.30.2